/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmDelay extends BasicModel<PmDelay> {
  projectno?: string; // 项目编码
  projectname?: string; // 项目名称
  remarks?: string; // 延期原因
  delayday?: number; // 延期天数
  starttime?: string; // 开始日期
  endtime?: string; // 结束日期
  createByName?: string; // 申请人
  createDate?: string; // 申请时间
  delayfile?: string; // delayfile
  delaynode?: string; // delaynode
  delayid?: string; // delayid
  usercode?: string; // usercode
  username?: string; // username
  checkper?: string; // checkper
  checktime?: string; // checktime
  ischeck?: number; // ischeck
  delayworkdays?: number; // delayworkdays
  exemptionid?: string; // exemptionid
  checkresult?: number; // checkresult
  lastchecktime?: string; // lastchecktime
  lastcheckorname?: string; // lastcheckorname
}

export const pmDelayList = (params?: PmDelay | any) =>
  defHttp.get<PmDelay>({ url: adminPath + '/process/delay/pmDelay/list', params });

export const pmDelayListData = (params?: PmDelay | any) =>
  defHttp.post<Page<PmDelay>>({ url: adminPath + '/process/delay/pmDelay/listData', params });

export const pmDelayForm = (params?: PmDelay | any) =>
  defHttp.get<PmDelay>({ url: adminPath + '/process/delay/pmDelay/form', params });

export const pmDelaySave = (params?: any, data?: PmDelay | any) =>
  defHttp.postJson<PmDelay>({ url: adminPath + '/process/delay/pmDelay/save', params, data });

export const pmDelayDelete = (params?: PmDelay | any) =>
  defHttp.get<PmDelay>({ url: adminPath + '/process/delay/pmDelay/delete', params });

export const pmDelayListIndexData = (params?: PmDelay | any) =>
  defHttp.post<Page<PmDelay>>({ url: adminPath + '/process/delay/pmDelay/listIndexData', params });

export const updateSjEndTime = (params?: PmDelay | any) =>
  defHttp.post<PmDelay>({ url: adminPath + '/process/delay/pmDelay/updateSjEndTime', params });

export const getAllowDelays = (params?: PmDelay | any) =>
  defHttp.post<PmDelay>({ url: adminPath + '/process/delay/pmDelay/getAllowDelays', params });